package com.xli.module.framemodule.entity.dto;

import com.xli.dto.validation.group.IGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;


@Data
public class ModuleDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = -3397087444061224860L;

    @Schema(description = "模块名称")
    @NotBlank(message = "name必填", groups = {IGroup.add.class, IGroup.update.class})
    private String name;

    @Schema(description = "路由地址")
    @NotBlank(message = "path必填", groups = {IGroup.add.class, IGroup.update.class})
    private String path;

    @Schema(description = "组件地址")
    private String component;

    @Schema(description = "权限标识")
    private String permission;

    @Schema(description = "上级模块")
    private String pid;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "模块显隐")
    @NotBlank(message = "isShow必填", groups = {IGroup.add.class, IGroup.update.class})
    private String isShow;

    @Schema(description = "模块状态")
    @NotBlank(message = "state必填", groups = {IGroup.add.class, IGroup.update.class})
    private String state;

    @Schema(description = "排序")
    private String orderNum;
}
